package com.dz51.core.exception;

/**
 * 业务异常基类
 */
public class BusinessException extends Exception {

	private static final long serialVersionUID = -6784291639216132019L;

	protected int state;

	public BusinessException() {
		super();
		this.state = 500;
	}

	public BusinessException(String message) {
		super(message);
		this.state = 500;
	}

	public BusinessException(int state, String message) {
		super(message);
		this.state = state;
	}

	/**
	 * Getter method for property <tt>state</tt>.
	 * 
	 * @return property value of state
	 */
	public int getState() {
		return state;
	}

	/**
	 * @see java.lang.Throwable#fillInStackTrace()
	 */
	@Override
	public Throwable fillInStackTrace() {
		return this;
	}
}
